package se.nestorthon.branding.server.webapp;

import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;


public class Starter {
	public static void main(String[] args) {
		Server server = new Server();
		try {
			SelectChannelConnector connector = new SelectChannelConnector();
			connector.setPort(8082);
			server.addConnector(connector);

/*			WebAppContext bb = new WebAppContext();
			bb.setServer(server);
			bb.setContextPath("/branding");
			bb.setWar("WebContent");
*/
            WebAppContext bb = new WebAppContext();
            bb.setServer(server);
            bb.setContextPath("/admin");
            bb.setWar("WebContent");
                    
			HandlerList handlers = new HandlerList();
			handlers.setHandlers(new Handler[] { bb,
			/* new SSOSetCookieHander("test.sso"), */new SimpleHandler() });
			server.setHandler(handlers);
			server.start();
			server.join();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
